﻿#pragma once

#include <QObject>

#include "GlobalDefine.h"
#include "CoreData.h"

class DataProcess  : public QObject
{
	Q_OBJECT

public:
	DataProcess(QObject *parent = nullptr);
	~DataProcess();

	//处理返回的字节流
	void processByteArrayOfBatteryInfo(QByteArray srcArr);
	void processByteArrayOfBatteryDetailInfo(QByteArray srcArr);
	void processByteArrayOfProtectParamInfo(QByteArray srcArr);
	void processByteArrayOfFactoryParamInfo(QByteArray srcArr);

	QVector<QString> getProtectReasonInfo(quint16 data);

signals:
	void readBatteryInfoFinished();
	void sendProtectParamInfo(ProtectParamInfo protectParamInfo);
	void sendFactoryParamInfo(FactoryParamInfo factoryParamInfo);

private:
	QByteArray m_byteArr;
};
